class CreateArtists < ActiveRecord::Migration
  def self.up
    create_table :artists do |t|
      t.string :name
      t.string :hometown
      t.integer :age
      t.boolean :published
      t.references :region
      
      t.float :map_lat
      t.float :map_lon
      t.integer :map_zoom
      t.boolean :show_map

      t.timestamps
    end
    
    Artist.create :name => "Joe Testuser", :region => Region.find_by_name('Mexico'), :hometown => "Saltillo", :age => 49, :map_lat => 46.604639, :map_lon => -120.506973, :map_zoom => 12, :published => true
    Artist.create :name => "Rose", :region => Region.find_by_name('Yakima'), :published => true, :map_lat => 46.604639, :map_lon => -120.506973, :map_zoom => 12
  end

  def self.down
    drop_table :artists
  end
end
